package horncomb.bpm.process.def.activity;

import horncomb.bpm.process.core.ExecutionContext;
import horncomb.bpm.process.def.state.DefaultStateDefinition;

/**
 * @author Daniel
 */
public abstract class AbstractActivityDefinition extends DefaultStateDefinition {
	private static final long serialVersionUID = 8982593132533357614L;

	/**
	 * @param id
	 */
	public AbstractActivityDefinition(String id) {
		super(id);
	}

	protected void doEnteringAction(ExecutionContext context) {
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected void doEnter(ExecutionContext context) {
		super.doEnter(context);
		this.doEnteringAction(context);
	}

	protected void doLeavingAction(ExecutionContext context) {
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected void doLeave(ExecutionContext context) {
		super.doLeave(context);
		this.doLeavingAction(context);
	}
}